<div class="pagination">
    <% if @story_pages.length > 1 then  %>
        <%= if !@story_pages.current.first? then link_to "&lt; Prev", :page=>@story_pages.current.previous else "&lt; Prev" end  %>
         <%= pagination_links(@story_pages) %>
         <%= if !@story_pages.current.last? then link_to "Next &gt;", :page=>@story_pages.current.next else "Next &gt;" end %>
    <% end %>
</div>